/**
  * @file MTRT_SNInfoAPI.h
  * @date 2020骞�9鏈�1鏃�
  * @author Thinkpad
  * @copyright ModelingTech
  * @brief
  * @details
  * @version V1.0.0
  */
#ifndef SRC_UNITMODULE_MTRT_SNINFOAPI_H_
#define SRC_UNITMODULE_MTRT_SNINFOAPI_H_
//#include<bits/types.h>//type
#include "vbase.h"

typedef struct TargetLicInfo
{
	int PureTopo_Row;
	int PureTopo_Cloumn;
	int WithMachine_Row;
	int WithMachine_Cloumn;
	__uint32_t SupportMachineSize;
	__uint16_t *SupportMachine;//0 PMSM;1 BLDC;2:Wound Rotor AC;3:Squirrel;4:Sync Machine;5:DC Machine;6:PuStandardSynMach;7 DoubleFed IG;8:3PhaseDynamicLoad
	__uint16_t Status;//0:Activated 1:Expired 2:Evaluation
	int SolverID;
	int EndDate;
	int LastDate;
	int BitfileType;
}TargetLicInfo;

typedef struct SNLineInfo
{
	__uint32_t            VersionLen;
	char          *Version;
	__uint32_t            SNLen;
	char          *SN;
	__uint32_t            TargetLicInfoSize;
	TargetLicInfo *TargetLicInfoArray;
	__uint64_t     FPGADNA;
	__uint64_t     FPGASN;
	__uint16_t     ProductID;
	__uint16_t     TargetType;//MT6020:6020,MT1070:1070
}SNLineInfo;

typedef struct SNtoHOST
{
	//StarSim HIL , pid =10;
	//HIL 的IO拓展bitfile， pid=11;
	//StarSim RCP，pid =20;
	//RCP 的IO 拓展bitfile，pid =21;
	__uint16_t ProductID;
	__uint16_t Status;//0:Activated 1:Expired 2:Evaluation
	int EndDate;
	__uint64_t Version;
}SNtoHOST;

/****
 * 20201203 bug fix zhaowei
 * **/
typedef struct H2T_GetSN
{
	__uint32_t SlotNumberSize;
	int       *SlotNumber;
	__uint64_t Version;
}H2T_GetSN;


H2T_GetSN H2T_GetSNTrans(char *revbuf,__uint32_t *ByteIndex_p);
/****
 * 20201203 bug fix zhaowei
 * **/
__uint64_t GetRCPDNA(int TargetType);
SNLineInfo MTReadSNDat(char* iniPath);
SNtoHOST SNtoHOSTTrans(char *revbuf,__uint32_t *ByteIndex_p);


#endif /* SRC_UNITMODULE_MTRT_SNINFOAPI_H_ */
